package com.ctshk.rpc.order.goods.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ctshk.rpc.order.goods.entity.CommoditySalesArea;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 商品销售区域 Mapper 接口
 * </p>
 *
 * @author 姜斌文
 * @since 2021-04-13
 */
public interface CommoditySalesAreaMapper extends BaseMapper<CommoditySalesArea> {

    /**
     * 查询商品销售区域
     * @param id
     * @param id1
     * @return
     */
    @Select({
            "SELECT id,commodity_id,area_type,commodity_attribute_id,create_id,modified_id,is_deleted,gmt_create,gmt_modified " +
                    "FROM `ctshk-goods`.t_commodity_sales_area " +
                    "WHERE (commodity_attribute_id = #{id} AND commodity_id = #{commodityId})"
    })
    List<CommoditySalesArea> selectSaleById(@Param("id") Long id, @Param("commodityId") Long id1);
}
